home *** CD-ROM | disk | FTP | other *** search
- unit ToolProc;
- {application wide tool procedures}
- {used to link to dll's or use/link objects into the current project}
-
- {the idea is to literally centralize calls for well defined stuff here.
- this makes it easier to use bound and unbound code by a compiler switch.}
-
- interface
-
- { Put this comment at the beginning of a line to use the DLL instead: $DEFINE USEDLL}
- {xx $DEFINE USEDLL}
- { Alternatively select Project Options|Directories/Conditionals and specify USEDLL there}
-
- {There is a tiny dpr for tpDLL included.}
-
- {$IFDEF USEDLL}
- uses
- Forms, Shells;
-
- {$ELSE}
- uses
- Forms, About;
- {$ENDIF}
-
- procedure AboutBox;
-
- implementation
-
- procedure AboutBox;
- begin
- {$IFDEF USEDLL}
- with TDLLShell.Create(Application) do try
- Run('tpDLL','AboutBox');
- finally
- Free; {finally free == delphi !}
- end
- {$ELSE} {use the same code as the invocation in the dll.}
- With TAboutBox.Create(Application) do try
- Execute;
- finally
- Free;
- end;
- {$ENDIF}
- end;
-
-
- end.
-